(:
XQuery that gets simple types from xsd
:)

declare namespace ns = "http://www.w3.org/2001/XMLSchema";
<xsd-simple>{
let $doc := doc("xsd.xsd")

for $types in $doc//ns:simpleType
let $name := $types/@name
return

   <simpleType name="{$name}"></simpleType>
}</xsd-simple>